<%-- 
    Document   : list
    Created on : 2014-1-22, 15:32:05
    Author     : chensy
--%>
<%@page contentType="text/html; charset=UTF-8" session="false" %>
<%@include  file="/WEB-INF/jspf/import.jspf"%>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" id="pagerForm" name="searchForm" method="post">
        <input type="hidden" name="pageNum" value="${pager.pageNo}" />
        <input type="hidden" name="pageSize" value="${pager.pageSize}" />
        <input type="hidden" name="orderField" value="${orderField}" />
        <input type="hidden" name="orderDirection" value="${orderDirection}" />
        <div class="searchBar">
            <table class="searchContent">
                <tbody>
                    <tr>
                        <td><label>车友会Id：</label><input type="text" name="clubId" value="${param.clubId}" class="textInput"></td>
                        <td><label>车友会名称：</label><input type="text" name="name" value="${name}" class="textInput"></td>
                        <td><label>地区：</label><input type="text" name="area" value="${area}" class="textInput"></td>
                        <td colspan="2"><label>加入时间：</label>
                            <input type="text" value="${beginDate}" name="beginDate" datefmt="yyyy-MM-dd 00:00:00" class="date" readonly="true">
                            至
                            <input type="text" value="${endDate}" name="endDate" datefmt="yyyy-MM-dd 23:59:59" class="date" readonly="true">
                        </td>
                    </tr>
                    <tr>
                        <td><label>车友会域名：</label><input type="text" name="clubUrl"  value="${param.clubUrl}" class="textInput"></td>
                        <td><label>品牌：</label><input type="text" name="brand"  value="${brand}" class="textInput"></td>
                        <td><label>车系：</label><input type="text" name="series"  value="${series}" class="textInput"></td>
                        <td>
                            等级：
                            <select class="" name="levelId">
                                <option value="">全部</option>
                                <c:forEach var="e" items="${levels}">
                                    <option value="${e.levelId}"<c:if test="${e.levelId==levelId}">selected</c:if> >${e.levelName}</option>
                                </c:forEach>
                            </select>
                        </td>
                         <td>分区：
                            <select  name="region">
                                <option value="0" ${region==0?"selected":""}>请选择</option>
                                <option value="1" ${region==1?"selected":""}>华北区</option>
                                <option value="2" ${region==2?"selected":""}>华东区</option>
                                <option value="3" ${region==3?"selected":""}>华中区</option>
                                <option value="4" ${region==4?"selected":""}>华南区</option>
                                <option value="5" ${region==5?"selected":""}>西南区</option>
                                <option value="6" ${region==6?"selected":""}>西北区</option>
                                <option value="7" ${region==7?"selected":""}>东北区</option>
                                <option value="8" ${region==8?"selected":""}>港澳台</option>
                            </select>
                        </td>
                        <td></td>
                        <td></td>
                    </tr>
                   
                </tbody>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="exportFile();">导出Excel</button></div></div></li>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <table class="table" style="width: 100%" layoutH="136">
        <thead>
            <tr>
                <th >车友会ID</th>
                <th >车友会名称</th>
                <th >个性域名</th>
                <th >地区</th>
                <th >分区</th>
                <th >车系</th>
                <th >主题</th>
                <th >QQ群</th>
                <th >等级</th>
                <th orderField="memberNum" class="${orderField=='memberNum' ? orderDirection : ''}">会员人数</th>
                <th orderField="vipNum" class="${orderField=='vipNum' ? orderDirection : ''}">认证人数</th>
                <th orderField="totalPetrol" class="${orderField=='totalPetrol' ? orderDirection : ''}">积分</th>
                <th orderField="auditAt" class="${orderField=='auditAt' ? orderDirection : ''}">创建时间</th>
                <th >主题贴</th>
                <th >操作</th>
            </tr>
        </thead>
        <tbody>
            <c:forEach var="e" items="${pager.resultList}">
                <tr>
                    <td>${e.clubId}</td>
                    <td><a href="${ROOT}/${fn:escapeXml(e.clubUrl)}/" target="_blank">${fn:escapeXml(e.name)}</a></td>
                    <td>${fn:escapeXml(e.clubUrl)}</td>
                    <td>${fn:escapeXml(e.provinceName)}&nbsp;&nbsp;${fn:escapeXml(e.cityName)}</td>
                    <td>${fn:escapeXml(e.regionName)}</td>
                    <td>${fn:escapeXml(e.brandName)}&nbsp;&nbsp;${fn:escapeXml(e.seriesName)}</td>
                    <td>${e.theme.themeName}</td>
                    <td>${e.qqGroup}</td>
                    <td>${e.level.levelName}</td>
                    <td>${e.memberNum}</td>
                    <td>${e.vipNum}</td>
                    <td>${e.totalPetrol}</td>
                    <td><fmt:formatDate value="${e.auditAt}" pattern="yyyy-MM-dd"/></td>
                    <td>${e.topicNum}</td>
                    <td>
	                    <a class="btnEdit" href="${ROOT}/admin/club/detail.do?clubId=${e.clubId}"
	                         target="navTab" rel="club-detail" title="修改车友会信息">修改车友会信息</a>
                                 <a style="color:blue;" href="${ROOT}/admin/medal/addMedal.do?clubId=${e.clubId}"
	                         target="dialog" rel="club-addMedal" title="颁发勋章">勋章</a>
                    </td>
                </tr>
            </c:forEach>
        </tbody>
    </table>
</div>
<div class="panelBar">
    <div class="pages">
        <span>共 ${pager.total} 条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.pageSize}" pageNumShown="10" currentPage="${pager.pageNo}"></div>
</div>
<script>
    var clubId="${param.clubId}";
    var name="${name}";
    var area = "${area}";
    var beginDate = "${beginDate}";
    var endDate = "${endDate}";
    var clubUrl = "${param.clubUrl}";
    var brand = "${brand}";
    var series = "${series}";
    var levelId = "${levelId}";
    var orderField = "${orderField}";
    var orderDirection = "${orderDirection}";
    function exportFile(){
        location.href="club/listBatchExport.do?clubId="+clubId+"&name="+name+"&area="+area+"&beginDate="+beginDate+"&endDate="+endDate+"&clubUrl="+clubUrl+"&brand="+brand+"&series="+series+"&levelId="+levelId+"&orderField="+orderField+"&orderDirection="+orderDirection;
    }
</script>
